home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 2.iso / dist / fw_gimp.idb / usr / freeware / include / libgimp / gimpmatrix.h.z / gimpmatrix.h
Encoding:
C/C++ Source or Header  |  2002-07-08  |  2.6 KB  |  76 lines

  1. /* LIBGIMP - The GIMP Library
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
  3.  *
  4.  * gimpmatrix.h
  5.  * Copyright (C) 1998 Jay Cox <jaycox@earthlink.net>
  6.  *
  7.  * This library is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU Lesser General Public
  9.  * License as published by the Free Software Foundation; either
  10.  * version 2 of the License, or (at your option) any later version.
  11.  *
  12.  * This library is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  * Lesser General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU Lesser General Public
  18.  * License along with this library; if not, write to the
  19.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  * Boston, MA 02111-1307, USA.
  21.  */
  22.  
  23. #ifndef __GIMP_MATRIX_H__
  24. #define __GIMP_MATRIX_H__
  25.  
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif /* __cplusplus */
  29.  
  30.  
  31. typedef gdouble GimpMatrix3[3][3];
  32. typedef gdouble GimpMatrix4[4][4];
  33.  
  34. void          gimp_matrix3_transform_point (GimpMatrix3  matrix, 
  35.                         gdouble      x, 
  36.                         gdouble      y,
  37.                         gdouble     *newx, 
  38.                         gdouble     *newy);
  39. void          gimp_matrix3_mult            (GimpMatrix3  matrix1, 
  40.                         GimpMatrix3  matrix2);
  41. void          gimp_matrix3_identity        (GimpMatrix3  matrix);
  42. void          gimp_matrix3_translate       (GimpMatrix3  matrix, 
  43.                         gdouble      x, 
  44.                         gdouble      y);
  45. void          gimp_matrix3_scale           (GimpMatrix3  matrix, 
  46.                         gdouble      x, 
  47.                         gdouble      y);
  48. void          gimp_matrix3_rotate          (GimpMatrix3  matrix, 
  49.                         gdouble      theta);
  50. void          gimp_matrix3_xshear          (GimpMatrix3  matrix, 
  51.                         gdouble      amount);
  52. void          gimp_matrix3_yshear          (GimpMatrix3  matrix, 
  53.                         gdouble      amount);
  54. gdouble       gimp_matrix3_determinant     (GimpMatrix3  matrix);
  55. void          gimp_matrix3_invert          (GimpMatrix3  matrix, 
  56.                         GimpMatrix3  matrix_inv);
  57. void          gimp_matrix3_duplicate       (GimpMatrix3  src, 
  58.                         GimpMatrix3  target);
  59.  
  60. gboolean      gimp_matrix3_is_diagonal     (GimpMatrix3  matrix);
  61. gboolean      gimp_matrix3_is_identity     (GimpMatrix3  matrix);
  62. gboolean      gimp_matrix3_is_simple       (GimpMatrix3  matrix);
  63.  
  64.  
  65. void          gimp_matrix4_to_deg          (GimpMatrix4  matrix,
  66.                         gdouble     *a,
  67.                         gdouble     *b,
  68.                         gdouble     *c);
  69.  
  70.  
  71. #ifdef __cplusplus
  72. }
  73. #endif /* __cplusplus */
  74.  
  75. #endif /* __GIMP_MATRIX_H__ */
  76.